<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>媒体查询</title>
    <style>
        @media screen and (max-width: 2000px) { /* @media(max-width: 2000px) 这样也可以 */
            body {
                background-color: red;
            }
        }
        @media screen and (max-width: 1000px) {
            body {
                background-color: yellow;
            }
        }
        @media screen and (max-width: 700px) {
            body {
                background-color: blue;
            }
        }
    </style>
</head>
<body>
    
</body>
</html>